cmake_minimum_required(VERSION 3.22.1)

project("ippusb")

file(GLOB_RECURSE LIBS "../../../libs/${ANDROID_ABI}/*.so")

include_directories(./)
include_directories(./include/libusb)

message("================ ${LIBS}")

add_library(${CMAKE_PROJECT_NAME} SHARED
        http.h
        http.c
        tcp.h
        tcp.c
        usb.h
        usb.c
        options.h
        options.c
        logging.h
        logging.c
        ippusbxd.c
        ippusbxd.h

        include/libusb/libusb.h
        include/libusb/config.h

        ippusb.cpp
        )

target_link_libraries(${CMAKE_PROJECT_NAME}
        ${LIBS}
        android
        log
        )

add_executable(ippusbd
        http.h
        http.c
        tcp.h
        tcp.c
        usb.h
        usb.c
        options.h
        options.c
        logging.h
        logging.c
        ippusbxd.c
        ippusbxd.h

        include/libusb/libusb.h
        include/libusb/config.h
        )

target_link_libraries(ippusbd
        ${LIBS}
        android
        log
        )